package com.zzj.ecology.commons.utils;

import javax.servlet.http.HttpSession;

/**
 * @ClassName HttpSessionUtils
 * @Description TODO
 * @Author zhijun zeng at 14:58 2020/4/25
 * @Version 1.0
 **/
public class HttpSessionUtils {

    /**
     * 获取session
     */
    public static HttpSession getSession() {
        return ServletUtils.getSession();
    }

    public static void setAttribute(String key, Object value) {
        getSession().setAttribute(key , value);
    }

    public static Object setAttribute(String key) {
        return getSession().getAttribute(key);
    }
}
